package com.weixing.mall.provider.model.dto;

import com.weixing.mall.core.enums.IsReadEnum;
import com.weixing.mall.core.validation.Mobile;
import com.weixing.mall.core.validation.Password;
import lombok.Data;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.NotNull;

/**
 * 会员注册dto
 *
 * @author  kfc
 * @since v1
 */
@Data
public class RegisterDto {
    /**
     * 手机号
     */
    @Mobile(message = "请输入正确的手机号")
    private String mobile;
    /**
     * 短信验证码
     */
    @NotNull(message = "验证码不能为空")
    private String smsCode;
    /**
     * 登录密码
     */
    @Password(message = "密码格式不正确，8-18数字和字母组成")
    private String password;
    /**
     * 确认密码
     */
    private String confirmPassword;
    /**
     * 代理商标识
     */
    @Length(max = 15,message = "参数不合法")
    private String agentFlag;
    /**
     * 协议是否已阅读
     */
    @NotNull(message = "参数不合法")
    private IsReadEnum isRead;
}
